/**
 * 
 */
package com.locky.ws;

import java.util.List;
import java.util.ArrayList;

import javax.persistence.*;

import java.sql.Date;

/** 
 * @author virgil
 */
@Entity
@Table(name="t_jour")
public class Jour {

	/**
	 * @uml.property  name="autorisation"
	 * @uml.associationEnd  inverse="jours:com.locky.ws.Autorisation"
	 */
	 @ManyToOne
	 @JoinColumn(name="autorisation_fk", insertable=false, updatable=false)
	private Autorisation autorisation;

	/**
	 * Getter of the property <tt>autorisation</tt>
	 * @return  Returns the autorisation.
	 * @uml.property  name="autorisation"
	 */
	public Autorisation getAutorisation() {
		return autorisation;
	}

	/**
	 * Setter of the property <tt>autorisation</tt>
	 * @param autorisation  The autorisation to set.
	 * @uml.property  name="autorisation"
	 */
	public void setAutorisation(Autorisation autorisation) {
		this.autorisation = autorisation;
	}

	

	/**
	 * @uml.property  name="creneauHoraires"
	 * @uml.associationEnd  multiplicity="(0 -1)" ordering="true" inverse="jour:com.locky.ws.CreneauHoraire"
	 */
	@OneToMany(targetEntity=CreneauHoraire.class)
	@JoinTable(name="t_jour_creneaux_horaires",
			joinColumns={@JoinColumn(name="jour_fk")},
			inverseJoinColumns={@JoinColumn(name="creneau_horaire_fk")})	
	private ArrayList creneauHoraires = new ArrayList<CreneauHoraire>();

	/**
	 * Getter of the property <tt>creneauHoraires</tt>
	 * @return  Returns the creneauHoraires.
	 * @uml.property  name="creneauHoraires"
	 */
	public ArrayList getCreneauHoraires() {
		return creneauHoraires;
	}

	/**
	 * Setter of the property <tt>creneauHoraires</tt>
	 * @param creneauHoraires  The creneauHoraires to set.
	 * @uml.property  name="creneauHoraires"
	 */
	public void setCreneauHoraires(ArrayList creneauHoraires) {
		this.creneauHoraires = creneauHoraires;
	}



	/**
	 * @uml.property  name="jourActivation"
	 */
	
	private Date jourActivation;

	/**
	 * Getter of the property <tt>jourActivation</tt>
	 * @return  Returns the jourActivation.
	 * @uml.property  name="jourActivation"
	 */
	public Date getJourActivation() {
		return jourActivation;
	}

	/**
	 * Setter of the property <tt>jourActivation</tt>
	 * @param jourActivation  The jourActivation to set.
	 * @uml.property  name="jourActivation"
	 */
	public void setJourActivation(Date jourActivation) {
		this.jourActivation = jourActivation;
	}



	/**
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;

	/**
	 * Getter of the property <tt>id</tt>
	 * @return  Returns the id.
	 * @uml.property  name="id"
	 */
	public int getId() {
		return id;
	}

	/**
	 * Setter of the property <tt>id</tt>
	 * @param id  The id to set.
	 * @uml.property  name="id"
	 */
	public void setId(int id) {
		this.id = id;
	}

}
